package com.huawei.deveco.common.security.util;

import java.security.DrbgParameters;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

public class DRBG {
    private static final SecureRandom RANDOM;

    static {
        try {
            RANDOM = SecureRandom.getInstance("DRBG", DrbgParameters.instantiation(128, DrbgParameters.Capability.RESEED_ONLY, null));
        } catch (NoSuchAlgorithmException e) {
            throw new UnsupportedOperationException(e);
        }
    }

    public static SecureRandom getSecureRandom() {
        return RANDOM;
    }
}
